﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using SILAS.Entidades;

namespace SILAS.DAO
{
    public class DistritoDAO : MasterDAO, IDistritoDAO
    {
        public Distrito getDistritobyUbigeo(string idubigeo)
        {
            var query = from p in context.Distritoes
                        select p;

            if (idubigeo != null)
            {
                query = query.Where(p => p.idUbigeo.Equals(idubigeo));
            }

            return query.SingleOrDefault();
        }
    }
}
